<!--
 * @Author: your name
 * @Date: 2021-04-03 17:14:24
 * @LastEditTime: 2021-05-30 18:57:55
 * @LastEditors: your name
 * @Description: In User Settings Edit
 * @FilePath: \遵义d:\HTML001\布局小技巧\时空隧道\时空隧道.html
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>时空隧道</title>
    <style>
        body{
            background-color: rgb(60, 60, 70);
            overflow: hidden;
        }
        .a{
            position: relative;
            width: 100%;
            height: 100%;
            display: flex;
            justify-content: center;
            align-items: center;
            top: 300px;
            perspective: 100px;
        }
        .b{
            width: 1100px;
            height: 500px;
            position: absolute;
            border-radius: 50px;
            border: 35px #fff solid;
            /* 同时设置内阴影和外阴影 */
            box-shadow: 0 0 80px rgb(150, 20, 100),inset0 0 80px rgb(150, 20, 100);
            animation:a 10s ease-in-out infinite both;
            animation-delay: calc(var(--i)*.5s);

        }
        @keyframes a{
            0%{
                opacity: 0;
                transform: translateZ(-700px)scale(.2);
            }
            100%{
                opacity: 1;
                transform: translateZ(200px)scale(1);
            }
        }
    </style>
</head>
<body>
    <div class="a">
        <div class="b" style="--i:1"></div>
        <div class="b" style="--i:2"></div>
        <div class="b" style="--i:3"></div>
        <div class="b" style="--i:4"></div>
        <div class="b" style="--i:5"></div>
        <div class="b" style="--i:6"></div>
        <div class="b" style="--i:7"></div>
        <div class="b" style="--i:8"></div>
        <div class="b" style="--i:9"></div>
        <div class="b" style="--i:10"></div>
        <div class="b" style="--i:11"></div>
        <div class="b" style="--i:12"></div>
        <div class="b" style="--i:13"></div>
        <div class="b" style="--i:14"></div>
        <div class="b" style="--i:15"></div>
        <div class="b" style="--i:16"></div>
        <div class="b" style="--i:17"></div>
        <div class="b" style="--i:18"></div>
        <div class="b" style="--i:19"></div>
        <div class="b" style="--i:20"></div>
    </div>
    


    <!-- 这里可以设置随机数，六个0-15的随机数 -->
    <!-- <script>
        for(let i = 0;i<6;i++){
            const a = Math.round(Math.random()*(15-0)+0)
        console.log(a)
        }
    </script> -->
</body>
</html>